package com.wh.service.IExt;

import com.wh.beans.Enum.UserTypeEnum;
import com.wh.beans.PathVariable.LoginInfo;
import com.wh.beans.PathVariable.LoginParam;
import com.wh.beans.PathVariable.RegisterParam;
import com.legend.security.PermissionType;
import com.wh.service.IBaseService;
import com.legend.utils.ReturnResult;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by ayakatsune on 14-6-14.
 */
public interface ISysUserBaseService extends IBaseService{
    /**
     * 注册用户
     * @param param 注册用户提交的参数
     * @param userType 用户类型
     * @return
     */
    public ReturnResult register(RegisterParam param, UserTypeEnum userType);

    /**
     * 检查用户权限
     * @param permissionTypes
     * @param s
     * @param request
     * @return
     */
    ReturnResult checkPower(PermissionType[] permissionTypes, String s, HttpServletRequest request);

    /**
     * work用户登录
     * @param user
     * @param userType
     * @return
     */
    ReturnResult userLogin(LoginParam user, UserTypeEnum userType);
    ReturnResult userLogin(LoginInfo info);
    ReturnResult delByIds(String ids);
    ReturnResult openNotebook(LoginInfo info);
}
